﻿@model Icoders.MarketTracker.Web.Lib.Model.PurchaseItemModel

@{
    ViewBag.Title = "Sale Item";
}

<h2>Sale Item</h2>



@using (Html.BeginForm(null, null, FormMethod.Post, new { autocomplete = "off" }))
{
    @Html.ValidationSummary(true)
    
          @Html.HiddenFor(model => model.Id)
           @Html.HiddenFor(model => model.IsSale)
            @Html.HiddenFor(model => model.ProductName)
          <div class="display-label">Point of Purchase </div>
          <div class="display-field"><strong>@ViewBag.Popname</strong></div>
        <div class="display-label">Product </div>
        <div class="display-field"><strong>@Model.ProductName</strong></div>

    if (ViewBag.IsSell == true)
    {
        <div class="editor-label">
            @Html.LabelFor(model => model.Quantity)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Quantity)
            @Html.ValidationMessageFor(model => model.Quantity)
        </div>
    }
    else
    {        
        <div class="editor-label">
            @Html.LabelFor(model => model.ReasonId)
        </div>
        <div class="editor-field">
           @Html.DropDownListFor(model => model.ReasonId, new SelectList(ViewBag.ReasonList, "value", "text"), "--Select Reason--")
            @Html.ValidationMessageFor(model => model.ReasonId)
        </div>
    }
        

        <p>
            <input type="submit" value="Next" />
        </p>
   
}



